package com.xr.web.controller.miniprogram;

import com.xr.common.core.controller.BaseController;
import com.xr.common.core.domain.AjaxResult;
import com.xr.miniprogram.domain.MiniProgramServiceLog;
import com.xr.miniprogram.domain.vo.MiniProgramServiceLogPageVO;
import com.xr.miniprogram.service.IMiniProgramServiceLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * description:服务日志模块接口
 *
 * @author: wls
 * @date: 2023/11/9 15:20
 * @version:1.0
 */
@Api("服务日志模块接口")
@RestController
@RequestMapping("/mini/serviceLog")
public class MpServiceLogController extends BaseController {
    @Resource
    private IMiniProgramServiceLogService serviceLogService;

    /**
     * 根据orderUserId查询相应的服务日志
     * @param orderUserId
     * @return
     */
    @ApiOperation("根据orderUserId查询相应的服务日志")
    @PreAuthorize("@ss.hasPermi('mini:serviceLog:query')")
    @RequestMapping("/get/{orderUserId}")
    public AjaxResult get(@PathVariable("orderUserId") Long orderUserId){
        return success(serviceLogService.getServiceLogPageVOByOrderUserId(orderUserId));
    }
}
